import request from '@/util/request'

// merchant list
export function list(data) {
  return request({
    url: '/api/merchant/list',
    method: 'post',
    data
  })
}

// -----------------------------------------------

// check is merchant & status
export function checkMerchant(data) {
  return request({
    url: '/api/merchant/check-merchant',
    method: 'post',
    data
  })
}

// merchant type
export function typeList(data) {
  return request({
    url: '/api/merchant/type-list',
    method: 'post',
    data
  })
}

// merchant submit
export function submit(data) {
  return request({
    url: '/api/merchant/submit',
    method: 'post',
    data
  })
}

// merchant edit
export function edit(data) {
  return request({
    url: '/api/merchant/edit',
    method: 'post',
    data
  })
}

// -----------------------------------------------

export function view(data) {
  return request({
    url: '/api/merchant/view',
    method: 'post',
    data
  })
}

// pay for
export function payFor(data) {
  return request({
    url: '/api/merchant/pay-for',
    method: 'post',
    data
  })
}

// fetch
export function fetch(data) {
  return request({
    url: '/api/merchant/fetch',
    method: 'post',
    data
  })
}

// submit
export function submitPay(data) {
  return request({
    url: '/api/merchant/submit-pay',
    method: 'post',
    data
  })
}

// ----------------------------------------------------------------

export function getPayAmount(data) {
  return request({
    url: '/api/merchant/get-pay-amount',
    method: 'post',
    data
  })
}
